package com.yidu.sanrenxing.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * @authors name:邓志强
 * @descriptions:
 * @date:2021/8/12 21:23
 * @version:1.0
 */
public class ImgFormat {

    /**
     *将单个图片路径转换
     * @param imgName
     * @return
     */
    public static String tranFormat(String imgName){
        return "http://localhost:8888/img/"+imgName;
    }

    /**
     * 同时转换一个图片路径集合
     * @param imgNameGroup
     * @return
     */
    public static  List<String> tranListFormat(List<String> imgNameGroup){
        ArrayList<String> list = new ArrayList<>();
        for (String s : imgNameGroup) {
            list.add(tranFormat(s));
        }
        return list;
    }

}
